//
//  HXMatersModel.m
//  ZCooking
//
//  Created by 韩旭 on 16/9/14.
//  Copyright © 2016年 HX_. All rights reserved.
//

#import "HXMatersModel.h"
#import "HXMaterTopsModel.h"
#import "HXMaterLikeModel.h"
#import "HXMaterRelateModel.h"

@implementation HXMatersModel
- (void)setValue:(id)value forUndefinedKey:(NSString *)key {
    if ([key isEqualToString:@"id"]) {
        self.ID = value;
    }
    if ([key isEqualToString:@"description"]) {
        self.Description = value;
    }
}
- (instancetype)initWithDic:(NSDictionary *)dic {
    self = [super initWithDic:dic];
    if (self) {
        self.topics = [[HXMaterTopsModel getTopicsModelWithArray:dic[@"topics"]] mutableCopy];
        self.like = [[HXMaterLikeModel getLikeModelWithArray:dic[@"like"]] mutableCopy];
        self.relates = [[HXMaterRelateModel getRelateModelWithArray:dic[@"relates"]] mutableCopy];
    }
    return self;
}
@end
